wayland: Move from g_memdup() to g_memdup2()
authorEmmanuele Bassi <ebassi@gnome.org>
Thu, 4 Feb 2021 19:14:47 +0000 (19:14 +0000)
committerEmmanuele Bassi <ebassi@gnome.org>
Thu, 11 Feb 2021 14:22:22 +0000 (14:22 +0000)
The g_memdup() function is replaced by a safer version in newer versions
of GLib.

gdk/wayland/gdkdevice-wayland.c

index 8e3cef103d4165eeff3e0bc67469dfe026f94d79..947302c219de3027f6d7e497af2d2a57a772f403 100644 (file)
@@ -39,6 +39,8 @@
 #include "gdkdropprivate.h"
 #include "gdkprimary-wayland.h"
 #include "gdkseatprivate.h"
+#include "gdk-private.h"
+
 #include "pointer-gestures-unstable-v1-client-protocol.h"
 #include "tablet-unstable-v2-client-protocol.h"
 
@@ -3472,8 +3474,7 @@ tablet_tool_handle_proximity_out (void                      *data,
 static double *
 tablet_copy_axes (GdkWaylandTabletData *tablet)
 {
-  return g_memdup (tablet->axes,
-                   sizeof (double) * GDK_AXIS_LAST);
+  return g_memdup2 (tablet->axes, sizeof (double) * GDK_AXIS_LAST);
 }
 
 static void